<?php
/*
 * Created on 04.01.2006
 *
 */

m2import('phpinchains/Filter.php');
m2import('base/ApplicationContext.php');

/**
 * Filter which calls the old admin view controller views
 */
class AdminAuthenticationFilter extends phpinchains_Filter
{

    var $adminDir;
    var $targetFile;
    var $targetExt;
    var $config;

    function init (& $config)
    {
        $this->config = $config;
    }

    function doFilter (& $env, & $chain)
    {
		$ctx = & base_ApplicationContext::getInstance();
		if ($this->config['install'] == 'true' || $ctx->authenticate()) 
		{
			$chain->doFilter($env);
		}
    }

}

?>